	var btn = document.getElementById('back');
	var bdy = document.documentElement||document.body;
	var genzhe = document.getElementById('fixed');
	var genzhe_top = genzhe.offsetTop;
    var timer = null;
    var leader = 0;
	var timer1 = null;
	var leader1 = 0 ;
	function scrollFn(evt){
		var target = Math.ceil(bdy.scrollTop + genzhe_top);
		clearInterval(timer1);
		timer1 = setInterval(function(){
			if (leader1<target) {
				leader1 = Math.ceil(leader1 + (target - leader1)/10);
			}else{
				leader1 = Math.floor(leader1 + (target - leader1)/10);
			}if (leader1 == target) {
				clearInterval(timer1);
			}
			genzhe.style.top = leader1 + "px";
		},20);
	}
	window.addEventListener('scroll',scrollFn,false);
	function scrollFn1(){
		if (bdy.scrollTop>3000) {
           btn.style.display = "block";
		}else {
			btn.style.display = "none";
		}
	}
	window.addEventListener('scroll',scrollFn1,false);
	btn.onclick = function(){
		huanDongFn();
	}
	function huanDongFn(){	
	   clearInterval(timer);
	   leader = bdy.scrollTop;
       timer = setInterval(function(){
          leader = parseInt(leader + (0-leader)/5);
          if (leader == 0) {
          	clearInterval(timer);
          }
            console.log(leader);
           window.scrollTo(0,leader);
       },20);
	}